/*
* @Author: asdw
* @Date:   2017-12-25 15:34:18
* @Last Modified by:   asdw
* @Last Modified time: 2017-12-25 15:35:08
*/
var Yeffect = {
    clickTabs: function (obj1, obj2, css) {
        css = css || "current";
        var objAY = [];
        var aabbs = 0;
        var cursinD = 0;
        var obj1obj = $(obj1);
        var obj2obj = $(obj2);
        obj1obj.each(function (index, element) {
            if ($(this).parent().attr("abs") != "bshhd") {
                $(this).parent().attr("abs", "bshhd");
                $(this).parent().attr("Aid", aabbs);
                aabbs++;
                objAY.push([]);
                cursinD = 0
            };
            $(this).attr("curId", cursinD);
            objAY[objAY.length - 1].push($(this));
            cursinD++
        });
        var objAYA = [];
        var aabbsA = 0;
        obj2obj.each(function (index, element) {
            if ($(this).parent().attr("absA") != "bshhd") {
                $(this).parent().attr("absA", "bshhd");
                $(this).parent().attr("AidA", aabbs);
                aabbsA++;
                objAYA.push([])
            };
            objAYA[objAYA.length - 1].push($(this))
        });
        obj1obj.removeClass(css);
        obj2obj.hide();
        for (var i = 0; i < objAY.length; i++) {
            objAY[i][0].addClass(css);
            objAYA[i][0].show()
        };
        obj1obj.click(function () {
            var ints = parseInt($(this).parent().attr("Aid"));
            var zhis = parseInt($(this).attr("curId"));
            for (var j = 0; j < objAY[ints].length; j++) {
                $(objAY[ints][j]).removeClass(css);
                $(objAYA[ints][j]).hide()
            };
            objAY[ints][zhis].addClass(css);
            objAYA[ints][zhis].show()
        })
    }
};
